<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

<portlet:defineObjects />

<html>

<script type="text/javascript">
    function getForm(namespace, name) {
        return document.forms[namespace + name];
    }

    function submitForm(namespace, name, action, page) {
    	var frm = getForm(namespace, name);
    	frm.txtAction.value = action;
    	frm.submitLink.value = page;
    	frm.submit();
    }
</script>

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Personal Information Tracking System</title>
<meta name="keywords" content="" />
<meta name="description" content="" />

<link href="style/style.css" rel="stylesheet" type="text/css"
	media="screen" />
</head>

<body>
<form name="<portlet:namespace/>loginForm" action="<portlet:actionURL/>"
	method="POST"><input type="hidden" name="txtAction" /> <input
	type="hidden" name="submitLink" />
<table align="center">
	<tr class="title">
		<td>
		<h1><a href="#">Personal information tracking system </a></h1>
		<p>exploit the value of data</p>
		<hr />
		</td>
	</tr>

	<tr>
		<td>&nbsp;</td>
	</tr>

	<tr>
		<td>
		<table border="1" width="100%" align="center" cellpadding="2"
			cellspacing="2">
			<tr>
				<td colspan="2">
				<h4 align="center" style="color: #FF0000">${sessionScope.successMess}
				${sessionScope.errorMess}</h4>
				</td>
			</tr>
			<tr>
				<td colspan="2">
				<h2 class="title">Login</h2>
				</td>
			</tr>
			<tr>
				<td>Username</td>
				<td><input type="text" name="txtUserName"
					value='${sessionScope.name}' /></td>
			</tr>
			<tr>
				<td>Password</td>
				<td><input type="password" name="txtPassword" /></td>
			</tr>
			<tr>
				<td colspan="2"><input type="button" value="Login"
					onclick="submitForm('<portlet:namespace/>', 'loginForm', 
												'login', 'Login.jsp')" /><br />
				<div align="right"><i><small>Don't have an
				account?&nbsp;</small></i> <a href="#"
					onclick="submitForm('<portlet:namespace/>', 'loginForm', 
												'register', 'Login.jsp')">Free
				sign up!</a> &nbsp;&nbsp;&nbsp; <%--a href="#">Forgot Password?</a--%></div>
				</td>
			</tr>
		</table>
		</td>
	</tr>

	<tr>
		<td>
		<div style="clear: both;">&nbsp;</div>
		<div id="footer">
		<p>Development by HCMUT Project 1 Spring 2010 Group 4</p>
		</div>
		</td>
	</tr>
</table>
</form>
</body>

</html>